package com.ybkj.o2o.zhuanxian.service.impl;

import com.ybkj.o2o.zhuanxian.entity.OrderMemo;
import com.ybkj.o2o.zhuanxian.mapper.OrderMemoMapper;
import com.ybkj.o2o.zhuanxian.service.OrderMemoService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class DefaultOrderMemoService implements OrderMemoService {

  @Autowired
  private OrderMemoMapper orderMemoMapper;


  @Override
  public int insert(OrderMemo orderMemo) {
    orderMemo.setCreated(new Date());
    orderMemo.setUpdated(new Date());
    return orderMemoMapper.insert(orderMemo);
  }

  @Override
  public List<OrderMemo> findByOrderId(Long orderId) {
    return orderMemoMapper.findByOrderId(orderId);
  }

}
